//权限菜单接口相关的函数
import request from "../../utils/request"


//权限菜单列表
export const menusList = (params) => {
    return request.get("/api/rule_menus/menus", { params })
}
//权限菜单列表含分页
export const menus = (params) => {
    return request.get("/api/rule_menus", { params })
}
//创建权限菜单
export const ruleMenus = (data) => {
    return request.post("/api/rule_menus", data)
}
//软删除菜单
export const menusdel = (data) => {
    return request.post("/api/rule_menus/",data)
}
//查询单个菜单
export const menusquery = (params) => {
    return request.get("/api/rule_menus/show", {params})
}
//菜单回收站
export const menusrecycle = (params) => {
    return request.get("/api/rule_menus/recycle", { params })
}
//从回收站恢复菜单
export const retrieve = (data) => {
    return request.post("/api/rule_menus/retrieve", data)
}
//批量恢复
export const retrieveMore = (data) => {
    return request.post("/api/rule_menus/retrieveMore", data)
}
//永久删除
export const deletemenus = (data) => {
    return request.post("api/rule_menus/delete", data)
}
//批量永久删除
export const deleteMore = (data) => {
    return request.post("/api/rule_menus/deleteMore", data)
}
//编辑修改单个菜单
export const menusModify = (data) => {
    return request.post("/api/rule_menus/update" , data)
}
//左侧菜单
export const leftmenus = (params) => {
    return request.get("/api/rule_menus/left_menus", { params })
}


//系统配置  获取配置信息
export const Sysshow = (params) => {
    return request.get("/api/system_config/show", { params })
}

//系统配置  保存配置信息
export const Sysupdate = (data) => {
    return request.post("/api/system_config/update", (data))
}
//借阅记录
export const Borrows = (params) => {
    return request.get("/api/search_stage/get_borrow_logs", { params })
}
//软删除借阅记录
export const delBorrows = (data) => {
    return request.post("/api/borrows/" ,data)
}
//查询借阅记录
export const Borrowsquery = (params) => {
    return request.get("/api/borrows/show", {params})
}
//编辑修改单个借阅记录
export const BorrowsModify = (data) => {
    return request.post("/api/borrows/update", data)
}
//软删除批量借阅记录
export const delBorrowsMore = (data) => {
    return request.post("/api/borrows/destroyMore", data)
}
//借阅记录回收站
export const Borrowsrecycle = (params) => {
    return request.get("/api/borrows/recycle", { params })
}
//永久删除借阅记录
export const delBorrowsrecycle = (data) => {
    return request.post("/api/borrows/delete", data)
}
//恢复借阅记录
export const Borrowsretrieve = (data) => {
    return request.post("/api/borrows/retrieve", data)
}
//批量永久删除借阅记录
export const delBorrowsrecycleMore = (data) => {
    return request.post("/api/borrows/deleteMore", data)
}
//批量恢复借阅记录
export const BorrowsretrieveMore = (data) => {
    return request.post("/api/borrows/retrieveMore", data)
}
//审批人员
export const searchUsers = (params) => {
    return request.get("api/users/search_users", { params })
}
//审批人员树状图
export const TreeUsers = (params) => {
    return request.get("api/approval/get_tree_users", { params })
}
//保存审批人员(审批配置)
export const configUsers = (data) => {
    return request.post("api/approval/config", (data))
}
//删除审批人员
export const delRule = (data) => {
    return request.post("api/approval/del_rule", (data))
}
/* 获取案卷审批数据 */
export const approvalData = (params) => {
    return request.get("api/approval/approval_book_titles", { params })
}
/* 审核案卷审批数据 */
export const approvalDataAction = (data) => {
    return request.post("api/approval/book_title_approval_action", (data))
}
/* 获取案卷审批案卷数据 */
export const BookTitles = (params) => {
    return request.get("/api/approval/book_titles", { params })
}
/* 获取案卷借阅案卷数据 */
export const borrowBookTitles = (params) => {
    return request.get("/api/approval/borrow_book_titles", { params })
}
/* 获取案卷审批卷内数据 */
export const BookCatalogs = (params) => {
    return request.get("/api/approval/book_catalogs", { params })
}





//获取分类审批列表（获取总分类）
export const waitAuditClassifies = (params) => {
    return request.get("/api/approval/wait_audit_classifies", { params })
}
//获取分类审批列表
export const classifyAudit = (data) => {
    return request.post("/api/approval/classify_audit", (data))
}
